Skip to content

Conversation

@vasyl-ks
Copy link
Contributor

Summary

Refactor transport to improve reliability, test coverage and performance by reducing per-packet allocations.

Implementation

  • Pooling: enable packet pooling; add pooled packets, encoder buffers, and UDP bytes.Reader reuse to cut allocations.
  • Concurrency: switch connection locking to RWMutex; use read locks on send paths.
  • Handlers: refactor TCP handling into smaller helpers; rename TCP connection helpers; add a UDP fault-replication helper.
  • Logging & errors: reuse loggers in hot paths; stop using the testing logger in transport; guard errChan sends to avoid nil error notifications.
  • Startup: add logger start hook and notify the frontend on start.
  • Tests: add/extend integration tests for handleConversation and handleSniffer; add unit coverage for packet handling, errors/notifications, TFTP read/write, and TCP/UDP server handlers; stabilize UDP tests by releasing pooled buffers and wiring encoder for packet id 100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants